package lib.combination;

import java.util.Iterator;

/**
 * Get all permutations of the given object array
 * 
 * 
 * @author <a href="www.sureinterview.com">SureInterview</a>
 * 
 * @param <T>
 *            Comparable objects.
 */
public abstract class Permutation<T> implements Iterable<T[]>, Iterator<T[]> {

	protected Permutation() {
	}

	/**
	 * Permutation of object array {@code obj}
	 * 
	 * @param obj
	 */
	public Permutation(T[] obj) {
	}

	/**
	 * Get the index-th permutation (0-based)
	 * 
	 * @param index
	 *            0-based index
	 * @return the permuted object array
	 */
	public abstract T[] get(Long index);
}
